import request from '@/utils/request'

// 1. 查询钉钉配置列表 (GET /system/dasicDingtalkConfig/list)
export function listDingtalkConfig(params) {
  return request({
    url: '/basic/system/dasicDingtalkConfig/list',
    method: 'get',
    params: params
  })
}

// 2. 导出钉钉配置列表 (POST /system/dasicDingtalkConfig/expect)
export function exportDingtalkConfig(data) {
  return request({
    url: '/basic/system/dasicDingtalkConfig/expect',
    method: 'post',
    data: data,
    responseType: 'blob'
  })
}

// 3. 获取钉钉配置详细信息 (GET /system/dasicDingtalkConfig/{dingtalkConfig})
export function getDingtalkConfig(dingtalkConfigId) {
  return request({
    url: `/basic/system/dasicDingtalkConfig/${dingtalkConfigId}`,
    method: 'get'
  })
}

// 4. 新增钉钉配置 (POST /system/dasicDingtalkConfig)
export function addDingtalkConfig(data) {
  return request({
    url: '/basic/system/dasicDingtalkConfig',
    method: 'post',
    data: data
  })
}

// 5. 修改钉钉配置 (PUT /system/dasicDingtalkConfig)
export function updateDingtalkConfig(data) {
  return request({
    url: '/basic/system/dasicDingtalkConfig',
    method: 'put',
    data: data
  })
}

// 6. 删除钉钉配置 (DELETE /system/dasicDingtalkConfig/{dingtalkConfig})
export function deleteDingtalkConfig(dingtalkConfigIds) {
  return request({
    url: `/basic/system/dasicDingtalkConfig/${dingtalkConfigIds}`,
    method: 'delete'
  })
}



// 获取供应商下拉列表 
export function getSupplierSelect() {
  return request({
    url: '/basic/system/basicSupplierInfo/supplierList',
    method: 'get'
  })
}